package com.wutuo.child.provider.component;

import cn.apestar.base.SpringContextHolder;
import cn.apestar.user.provider.institution.service.SysAreaService;
import com.wutuo.school.provider.service.SchoolService;

import java.util.List;


public class ChildDataConvert {

    private static SchoolService schoolService = SpringContextHolder.getBean(SchoolService.class);
    private static SysAreaService sysAreaService =
        SpringContextHolder.getBean(SysAreaService.class);

    // 翻译
    public static <T> void convertToInstitutionResponseList(List<T> list) {
        schoolService.getSchoolByIds(list, "schoolId", "school");
        sysAreaService.getAreaServiceById(list, "province", "shengName");
        sysAreaService.getAreaServiceById(list, "city", "cityName");
        sysAreaService.getAreaServiceById(list, "county", "xianName");
    }

}
